﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="send_manage.aspx.cs" Inherits="AnyOffice.general.mobile.send_manage" %>

<%@Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>短信发送管理</title>
		<script>
function delete_all()
{
	msg="确认要删除所有手机短信吗？"; 
	if(window.confirm(msg))
		return true
	else
		return false;
}
function delete_sms(mobile_id)
{
 msg='确认要删除该手机短信么？';
 if(window.confirm(msg))
 {
  URL="send_delete.aspx?mobile_id=" + mobile_id + "&page=<%=ViewState["CurrentPage"]%>";
  window.location=URL;
 }
}

function rest_sms(mobile_id)
{
 msg='确认要重发该手机短信么？';
 if(window.confirm(msg))
 {
  URL="send_rest.aspx?mobile_id=" + mobile_id + "&page=<%=ViewState["CurrentPage"]%>";
  window.location=URL;
 }
}
</script>
	</HEAD>
	<body class="bodycolor" style="padding-top:0;" topmargin="5">
		<form id="Form1" method="post" runat="server">
         <div class="main_div">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="tab_ti" width="40%"><span class="big3">
							短信发送管理</span></td>
					<td width="20%">
						<asp:Literal id="litNavCount" runat="server"></asp:Literal>
					</td>
					<td width="40%" align=right>
						<asp:Literal id="litNavPager" runat="server"></asp:Literal>
                        <asp:Button ID="btnDeleteAll" runat="server" CssClass="SmallButton" Text="全部删除" OnClick="btnDeleteAll_Click" /></td>
				</tr>
			</table>			
			<asp:panel id="pnlMain" runat="server">
				<asp:Repeater id="rptMobile" runat="server">
					<HeaderTemplate>
						<table id="beSortTable" width="100%" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
							<tr>								
								<th nowrap align="center">收信人</th>
								<th nowrap align="center">手机号码</th>
								<th nowrap align="center">内容</th>
								<th nowrap align="center">发送时间</th> 
								<th nowrap align="center">操作</th>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td nowrap align="center"><%#Eval("username").ToString() != string.Empty ? GetUserNames(Eval("username").ToString()) : ""%></td>							
							<td nowrap align="center"><%#Eval("Mbno")%></td>
							<td><%#Eval("Msg")%></td>
							<td nowrap align="center"><%#Eval("SendTime")%></td> 
							<td nowrap align="center">
							    <%#Eval("Report").ToString() == "2" ? "<a href=\"javascript:rest_sms(" + Eval("ID").ToString() + ");\">重新发送</a>" : ""%>
								<a href="javascript:delete_sms(<%#Eval("ID")%>);">删除</a>
							</td>
						</tr>
					</ItemTemplate>
					<AlternatingItemTemplate>
						<tr class="TableLine2">
						<td nowrap align="center"><%#Eval("username").ToString() != string.Empty ? GetUserNames(Eval("username").ToString()) : ""%></td>							
							<td nowrap align="center"><%#Eval("Mbno")%></td>
							<td><%#Eval("Msg")%></td>
							<td nowrap align="center"><%#Eval("SendTime")%></td> 
							<td nowrap align="center">
							    <%#Eval("Report").ToString() == "2" ? "<a href=\"javascript:rest_sms(" + Eval("ID").ToString() + ");\">重新发送</a>" : ""%>
								<a href="javascript:delete_sms(<%#Eval("ID")%>);">删除</a>
							</td>
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</table>
					</FooterTemplate>
				</asp:Repeater>
				<div class="div_cotr">
							<Webdiver:AspNetPager id="AspNetPager1" runat="server" CssClass="small1" InputBoxClass="SmallInput" SubmitButtonClass="bnt05"
								Font-Size="10pt" OnPageChanged="ChangePage" HorizontalAlign="Right" ShowCustomInfoSection="left" ShowInputBox="Always"
								SubmitButtonText="转 到" NumericButtonTextFormatString="[{0}]" UrlPaging="True" CustomInfoSectionWidth="35%"
								PagingButtonSpacing="0" ImagePath="../images" ButtonImageNameExtension="n" CpiButtonImageNameExtension="r"
								DisabledButtonImageNameExtension="g" PageSize="10" AlwaysShow="True"></Webdiver:AspNetPager>
				    <div style="clear:both;"></div>
				</div>
			</asp:panel><asp:literal id="litMessage" runat="server"></asp:literal>
            </div>
		</form>
	</body>
</HTML>
